package bill.java.interview.salesforce;

public class GeneralTreeTest {
	
	public static void main(String [] args){
		
		// to construct a tree like this
		/**
		 * 
		 * 
		 *home  |bill
		 * 		|judy	|ade
		 * 				|java
		 * 				|forms
		 * 				|plsql
		 * 		|enda
		 * 
		 */
		
		GeneralTreeNode<String> home = new GeneralTreeNode<String>("home");
		GeneralTreeNode<String> bill = new GeneralTreeNode<String>("bill");
		GeneralTreeNode<String> judy = new GeneralTreeNode<String>("judy");
		GeneralTreeNode<String> enda = new GeneralTreeNode<String>("enda");
		GeneralTreeNode<String> ade = new GeneralTreeNode<String>("ade");
		GeneralTreeNode<String> java = new GeneralTreeNode<String>("java");
		GeneralTreeNode<String> forms = new GeneralTreeNode<String>("forms");
		GeneralTreeNode<String> plsql = new GeneralTreeNode<String>("plsql");
		
		home.setParent(null);
		home.setLeftChild(bill);
		home.setRightSibling(null);
		
		
		bill.setParent(home);
		bill.setLeftChild(null);
		bill.setRightSibling(judy);
		
		
		judy.setParent(home);
		judy.setLeftChild(ade);
		judy.setRightSibling(enda);
		
		/***
		 * etc.........
		 */
	}

}
